package com.example.study.commen.print;

import javax.print.event.PrintJobEvent;
import javax.print.event.PrintJobListener;


public class MyPrintJobListener implements PrintJobListener {

    @Override
    public void printDataTransferCompleted(PrintJobEvent pje) {
        System.out.println("printDataTransferCompleted通知客户端数据已成功传输到打印服务，客户端可以释放为该数据分配的本地资源");
    }

    @Override
    public void printJobCompleted(PrintJobEvent pje) {
        System.out.println("printJobCompleted通知客户该作业成功完成。");
    }

    @Override
    public void printJobFailed(PrintJobEvent pje) {
        System.out.println("printJobFailed通知客户该作业未成功完成，必须重新提交。");
    }

    @Override
    public void printJobCanceled(PrintJobEvent pje) {
        System.out.println("printJobCanceled通知客户该作业被用户或程序取消。");
    }

    @Override
    public void printJobNoMoreEvents(PrintJobEvent pje) {
        System.out.println("printJobNoMoreEvents通知客户不会再发送任何事件。");
    }

    @Override
    public void printJobRequiresAttention(PrintJobEvent pje) {
        System.out.println("printJobRequiresAttention通知客户某些可能出现用户纠正的问题（例如打印机缺纸）。");
    }

}